package com.example.ceedataanalysis.controller;

import com.example.ceedataanalysis.entity.SchoolRank;
import com.example.ceedataanalysis.service.impl.SchoolServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/schoolRank")
public class SchoolRankController {

    @Autowired
    private SchoolServiceImpl service;

    //总数排名
    @ResponseBody
    @RequestMapping("/total")
    public List<SchoolRank> getTotalRank() {
        return service.getTotalRank();
    }

    //重点学科数量排名
    @ResponseBody
    @RequestMapping("/keyDiscipline")
    public List<SchoolRank> getKeyDisciplineRank() {
        return service.getKeyDisciplineRank();
    }

    //重点实验室数量排名
    @ResponseBody
    @RequestMapping("/keyLaboratory")
    public List<SchoolRank> getKeyLaboratoryRank() {
        return service.getKeyLaboratoryRank();
    }

    //硕士点数量排名
    @ResponseBody
    @RequestMapping("/master")
    public List<SchoolRank> getMasterRank() {
        return service.getMasterRank();
    }

    //博士点排名
    @ResponseBody
    @RequestMapping("/doctor")
    public List<SchoolRank> getDoctorRank() {
        return service.getDoctorRank();
    }

    //    就业率排名
    @ResponseBody
    @RequestMapping("/job")
    public List<SchoolRank> getJobRank() {
        return service.getJobRank();
    }

    //    出国率排名
    @ResponseBody
    @RequestMapping("/abroad")
    public List<SchoolRank> getAbroadRank() {
        return service.getAbroadRank();
    }

    //升学率排名
    @ResponseBody
    @RequestMapping("/postgraduate")
    public List<SchoolRank> getPostgraduateRank() {
        return service.getPostgraduateRank();
    }

    //男生和女生的人数
    @ResponseBody
    @RequestMapping("/menAndFemaleNum")
    public List<SchoolRank> getMenAndFemale() {
        return service.getMenAndFemale();
    }

    //女生比例排名
    @ResponseBody
    @RequestMapping("/femaleRateRank")
    public List<SchoolRank> getFemaleRateRank() {
        return service.getFemaleRateRank();
    }

    //总人数排名
    @ResponseBody
    @RequestMapping("/totalNumRank")
    public List<SchoolRank> getTotalNumRank() {
        return service.getTotalNumRank();
    }

    //男生人数排名
    @ResponseBody
    @RequestMapping("/menNumRank")
    public List<SchoolRank> getMenRank() {
        return service.getMenRank();
    }

    //女生人数排名
    @ResponseBody
    @RequestMapping("/femaleNumRank")
    public List<SchoolRank> getFemaleRank() {
        return service.getFemaleRank();
    }

    //男生比例排名
    @ResponseBody
    @RequestMapping("/menRateRank")
    public List<SchoolRank> getManRateRank() {
        return service.getManRateRank();
    }
}
